package com;

import com.util.GzipUtil;
import sun.misc.BASE64Encoder;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;

public class ImageDemo {

    /**
     * 影像上传例子
     {
     "REQSYSID": "REQSYSID",
     "PLATID": "PLATID",
     "DOCKING_ORGNO": "DOCKING_ORGNO",
     "APPLY_NO": "APPLY_NO",
     "LOAN_APPLY_NO": "LOAN_APPLY_NO",
     "FILENAME": "FILENAME",
     "FILE": "FILE"
     }

     */
    public static void main(String[] args) {
        //上传文件
        File file = new File("D:/p.zip");

        //把上传文件转成Base64字符串，把转换后的字符村放到报文中的“FILE”字段提交到rest接口
        String filestr = GzipUtil.fileToString(file);

    }

}
